import Home from "../pages/Home"
import Login from "../pages/Login"

// 二级路由
import Management from '../pages/home/Management'
import User from '../pages/home/User'
import Exam from '../pages/home/Exam'
import Class from '../pages/home/Class'
import Read from '../pages/home/Read'

// 三级路由
import AddManagement from '../pages/home/management/AddManagement'
import ManagementType from '../pages/home/management/ManagementType'
import ReadManagement from '../pages/home/management/ReadManagement'

export default [
    {
        path: "/login",
        component: Login
    },
    {
        path: "/home",
        component: Home,
        auth: ["管理员", "出题者", "浏览者"],
        children: [
            {
                path: "/home/Management",
                component: Management,
                title: "试题管理",
                auth: ["管理员", "出题者", "浏览者"],
                children: [
                    {
                        path: "/home/Management/AddManagement",
                        component: AddManagement,
                        title: "添加试题",
                        auth: ["管理员", "出题者", "浏览者"],
                    },
                    {
                        path: "/home/Management/ManagementType",
                        component: ManagementType,
                        title: "试题分类",
                        auth: ["管理员", "出题者"],
                    },
                    {
                        path: "/home/Management/ReadManagement",
                        component: ReadManagement,
                        title: "查看试题",
                        auth: ["管理员"],
                    }
                ]
            },
            {
                path: "/home/User",
                component: User,
                title: "用户管理",
                auth: ["管理员", "出题者"],
                children: [
                    {
                        path: "/home/User/AddManagement",
                        component: AddManagement,
                        title: "添加用户",
                        auth: ["管理员", "出题者", "浏览者"],
                    },
                    {
                        path: "/home/User/ManagementType",
                        component: ManagementType,
                        title: "用户展示",
                        auth: ["管理员", "出题者"],
                    }
                ]
            },
            {
                path: "/home/Exam",
                component: Exam,
                title: "考试管理",
                auth: ["管理员"],
            },
            {
                path: "/home/Class",
                component: Class,
                title: "班级管理",
                auth: ["管理员", "出题者"],
            },
            {
                path: "/home/Read",
                component: Read,
                title: "阅卷管理",
                auth: ["管理员"]
            }
        ]
    }
]